
using System;
using System.Data.Objects;
using System.Data.EntityClient;
using DomainModel.Entities;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data;

namespace DomainModel.Context
{
    public partial class Q8CarDbContext : DbContext
    {
        #region DbSet Properties
        public DbSet<Advertise> Advertises { get; set; }
        public DbSet<Company> Companies { get; set; }
        public DbSet<CompanyType> CompanyTypes { get; set; }       
        public DbSet<Picture> Pictures { get; set; }
        public DbSet<PicturesInCompany> PicturesInCompanies { get; set; }
        public DbSet<PicturesInVehicle> PicturesInVehicles { get; set; }
        public DbSet<Rent> Rents { get; set; }
        public DbSet<RentalPolicy> RentalPolicies { get; set; }
        public DbSet<RentInRentalPolicy> RentInRentalPolicies { get; set; }
        public DbSet<Sell> Sells { get; set; }
        public DbSet<Vehicle> Vehicles { get; set; }
        public DbSet<VehicleBrand> VehicleBrands { get; set; }
        public DbSet<VehicleCategory> VehicleCategories { get; set; }
        
        #endregion

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Advertise>().ToTable("Advertise");
            modelBuilder.Entity<Company>().ToTable("Company");
            modelBuilder.Entity<CompanyType>().ToTable("CompanyType");        
            modelBuilder.Entity<Picture>().ToTable("Picture");
            modelBuilder.Entity<PicturesInCompany>().ToTable("PicturesInCompany");
            modelBuilder.Entity<PicturesInVehicle>().ToTable("PicturesInVehicle");
            modelBuilder.Entity<Rent>().ToTable("Rent");
            modelBuilder.Entity<RentalPolicy>().ToTable("RentalPolicy");
            modelBuilder.Entity<RentInRentalPolicy>().ToTable("RentInRentalPolicy");
            modelBuilder.Entity<Sell>().ToTable("Sell");
            modelBuilder.Entity<Vehicle>().ToTable("Vehicle");
            modelBuilder.Entity<VehicleBrand>().ToTable("VehicleBrand");
            modelBuilder.Entity<VehicleCategory>().ToTable("VehicleCategory");            
        }
    }
}
